home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19970326-19970626
/
000329_news@newsmaster….columbia.edu _Fri Jun 20 01:21:38 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id BAA28994
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 20 Jun 1997 01:21:38 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id BAA21524
for kermit.misc@watsun; Fri, 20 Jun 1997 01:21:37 -0400 (EDT)
Path: news.columbia.edu!panix!news.mathworks.com!news.maxwell.syr.edu!feed.nntp.acc.ca!newsfeeder.toronto.ican.net!news.rochester.ican.net!not-for-mail
From: vefatica@syr.edu (Vincent Fatica)
Newsgroups: comp.protocols.kermit.misc
Subject: ShellExecute()
Date: Fri, 20 Jun 1997 05:01:46 GMT
Organization: Syracuse University Mathematics
Lines: 47
Message-ID: <33a9fbb4.471671067@news.rochester.ican.net>
Reply-To: vefatica@syr.edu
NNTP-Posting-Host: ppp-048.syracuse-01.ican.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: Forte Agent 1.01/32.397
Xref: news.columbia.edu comp.protocols.kermit.misc:7191
OK ... so I built this useful little one-liner (on NT 4.0 with
MSVC++4.0) ...
//SE.CPP
#include <windows.h>
HINSTANCE main ( int argc, char * argv[] )
{return ShellExecute(NULL, "open", argv[1],
(argc > 2) ? argv[2] : NULL,
(argc > 3) ? argv[3] : NULL,
SW_SHOW);
}
syntax: SE [shell_object] [parameters [working dir]]
(Empty and multiword "parameters" must be "quoted"; likewise
path\program names containing spaces.)
It can be used as K95's browser (tried it). Also, if you invoke SE
from the K95 command line (with "run"), since SE itself exits, you can
return to the K95 prompt while the browser (or whatever) is still
running. It works here (on NT); no promises intended.
Command line examples:
se http://www.kermit.columbia (netscape, (here))
se c: (explorer)
se c:\winnt (explorer)
se CMD "" c:\winnt (CMD session)
se CMD "/c file.bat" (run bat & quit)
se mailto:vefatica@syr.edu (pmail, (here))
se file.txt (notepad)
se file.doc (word, (here))
se ftp://kermit.columbia.edu (netscape)
se CMD "/k dir /s /p" h:\k95\ (run dir & stay)
se (starts explorer in root/boot dir (here anyway))
SE should start anything the shell knows how to handle, otherwise,
fail and return 0. Anyone is welcomed to it. Get it (15872 bytes) at:
ftp://math.syr.edu/pub/vefatica/se.exe
- Vince
___
Vincent Fatica
Syracuse University Mathematics
vefatica@syr.edu
http://barnyard.syr.edu/~vefatica/